Technical Field
The present invention relates to an image processing apparatus, an image capturing apparatus, and a storage medium storing an image processing program.
Background Art
Image capturing apparatuses have been employed to track moving subjects or objects, in which the image capturing apparatus continuously captures a plurality of image frames along the time line to track a moving subject, and performs the focus and exposure control for capturing images of the moving subject based on a tracking result.
For example, a camera system applying a template matching process to enhance detection precision of a tracking target is known. Specifically, the camera system corrects brightness of a template image indicating a feature of a subject (tracking target) based on a change of brightness between an area of current position of the tracking target and an area of predicted movement position of the tracking target in the image frames.
A description is given of a scheme of a subject tracking with reference to FIG. 9, in which a train moving with a high speed is tracked as a subject. When a digital camera is used for capturing an image, a shutter is half-pressed to set the focus and exposure level, and then the shutter is released to capture one or more images.
At a timing of FIG. 9A, a user half-presses the shutter to set a target tracking area of the subject as indicated by a rectangular frame F0. Then, the camera performs the subject tracking and obtains a tracking result indicated by a rectangular frame F1 as shown in FIG. 9B. The focus and the exposure level are set based on the tracking result of FIG. 9B, and then the user releases the shutter of the camera.
However, since the camera requires a given time period to activate the image capturing process, the subject moves from a position of FIG. 9B to another position in the given time period. Therefore, when the camera captures an image of the subject actually, the subject changes its position from the position of FIG. 9B to the position of FIG. 9C, which means the position of the subject of FIG. 9C (rectangular frame F2) deviates from the position of the subject of FIG. 9B (rectangular frame F1) used for setting the focus and the exposure level, which means a delay of the image capturing (i.e., time lag) occurs between FIGS. 9B and 9C. Therefore, an image of the subject in an actually captured image is out of the focus, and thereby the image of the subject blurs. Further, the exposure level of FIG. 9C also changes from the exposure level of FIG. 9B, and thereby the image is captured actually without setting the correct exposure level.
When a moving subject is captured by a camera, a position of the subject at a moment of the image capturing is required to be measured correctly, and the focus and the exposure level are also required to be set correctly. However, the focus and the exposure level of the subject may change from a time point when the shutter of the camera is half-pressed to a time point when the shutter of the camera is released.